/*
 * Equip.h
 *
 *  Created on: 2013. 9. 11.
 *      Author: jjaehuny
 */

#ifndef PROJECTZ_NLOGIC_EQUIP_H_
#define PROJECTZ_NLOGIC_EQUIP_H_

#include "../Enum.h"
#include <map>
#include <inttypes.h>

namespace ProjectZ {
class User;
} /*ProjectZ*/

namespace ProjectZ { namespace NLogic {

class Item;

class Equip
{
public:
	typedef std::map<int, Item *> EQUIPTREE;

public:
	Equip(User * pUser);
	virtual ~Equip();

	void 			Initialize();
	void 			Finalize();

	bool 			AddItem(EnumItemEquipPosition ePosition, Item * pItem);
	Item *			GetItem(EnumItemEquipPosition ePosition);
	Item *			PopItem(EnumItemEquipPosition ePosition);
	bool 			IsExistItem(EnumItemEquipPosition ePosition);

	EQUIPTREE &		GetEquipTree();

	void			EquipAddFromCharacterInfo( int a_iCaller );
	void			UpdateCharacterInfo();

	int				HasItemCount();
	int				GetEquipItemIconIndex(EnumItemEquipPosition ePosition);

private:
	User *			_user;

//	static const int s_max = 12;
	EQUIPTREE 		_clsEquipTree;
};

} /*NLogic*/ } /* namespace ProjectZ */

#endif /* PROJECTZ_NLOGIC_EQUIP_H_ */
